﻿#region Usings

using Box2DX.Dynamics;

#endregion

namespace SilverBox.Physics
{
    public class SimpleBoundaryListener : BoundaryListener
    {
        #region Delegates

        public delegate void ViolationDelegate(Body body);

        #endregion

        public SimpleBoundaryListener(ViolationDelegate violation)
        {
            Delegate = violation;
        }

        public ViolationDelegate Delegate { get; private set; }


        public override void Violation(Body body)
        {
            Delegate.Invoke(body);
        }
    }
}